﻿@model IEnumerable<Model.SystemSetting.UserInfo>

@{
    ViewBag.Title = "Index";
}
<style type="text/css">
    th {text-align:center}
    td {text-align: center;}
</style>

<h2>用户管理</h2>

@using (Html.BeginForm()) {

    <div>
        <span>用户名：</span>
        <p>
            @Html.TextBox("userName")<br />
            <input type="submit" value="Serach" />
        </p>
    </div>

    @Html.ActionLink("CreateUser","CreateUser")

    <table border="1">
        <tr>
            <th width="100">
                @Html.DisplayNameFor(model => model.LoginName)
            </th>        
            <th width="100">
                @Html.DisplayNameFor(model => model.UserName)
            </th>
            <th width="100">
                @Html.DisplayNameFor(model => model.UserIDNo)
            </th>
            <th width="100">
                @Html.DisplayNameFor(model => model.UserMobile)
            </th> 
            <th width="100">
                @Html.DisplayNameFor(model => model.Forbidden)
            </th>
            <th width="100"></th>
        </tr>

    @foreach (var item in Model) {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.LoginName)
            </td>       
            <td>
                @Html.DisplayFor(modelItem => item.UserName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.UserIDNo)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.UserMobile)
            </td> 
            <td>
                @Html.DisplayFor(modelItem => item.Forbidden)
            </td>
            <td>
                @Html.ActionLink("Edit", "EditUser", new { id = item.UserId }) |
                @Html.ActionLink("Delete", "DeleteUser", new { id=item.UserId })
            </td>
        </tr>
    }

    </table>

}